import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { JwtModule } from '@nestjs/jwt';
import { UserModule } from './api/base/user/user.module'; // 用户模块
import { SmsModule } from './api/base/sms/sms.module';

@Module({
  imports: [
    JwtModule.register({
      global: true,
      secret: 'daidaigou', // 密钥
      // signOptions: { expiresIn: '7d' },
      // signOptions: { expiresIn: '1m' },
      signOptions: { expiresIn: '1d' },
    }),
    UserModule,
    SmsModule,
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
